//
//  NetworkingTool.h
//  BaseAPP
//
//  Created by Evisu on 16/11/21.
//  Copyright © 2016年 evisum. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>

typedef void(^successBlock)(id jsonResponse);
typedef void(^errorBlock)(id jsonResponse);
typedef void(^netStatusBlock)(id netStatus);

@interface NetworkingTool : NSObject

/**
 *  GET数据请求
 *
 *  @param urlString    URL
 *  @param parameters   参数
 *  @param successBlock 成功回调
 *  @param errorBlock   失败回调
 */
+ (void)GETByURL:(NSString *)urlString parameters:(id)parameters success:(successBlock)successBlock failure:(errorBlock)errorBlock;

/**
 *  POST数据请求
 *
 *  @param urlString    URL
 *  @param parameters   参数
 *  @param successBlock 成功回调
 *  @param errorBlock   失败回调
 */
+ (void)POSTByURL:(NSString *)urlString parameters:(id)parameters success:(successBlock)successBlock failure:(errorBlock)errorBlock;

/**
 *  post上传图片
 *
 *  @param urlString    URL
 *  @param parameters   参数
 *  @param imageArray   图片集合
 *  @param successBlock 成功回调
 *  @param errorBlock   失败回调
 */
+ (void)uploadPostByURL:(NSString *)urlString parameters:(id)parameters image:(NSMutableArray *)imageArray success:(successBlock)successBlock failure:(errorBlock)errorBlock;

/**
 *  网络监测
 *
 *  @param status 监测回调
 */
+ (void)ReachabilityStatus:(netStatusBlock)netStatus;

@end
